package org.beetl.sql2o.converters;

/**
 * Used by sql2o to convert a value from the database into a {@link Float}.
 */
public class FloatConverter extends NumberConverter<Float> {

 public FloatConverter(boolean primitive) {
  super(primitive);
 }

 protected Float convertNumberValue(Number val) {
  return val.floatValue();
 }

 protected Float convertStringValue(String val) {
  return Float.parseFloat(val);
 }

 protected String getTypeDescription() {
  return Float.class.toString();
 }
}
